
package acceptanceTests.registration;
//
//import acceptanceTests.*;
import junit.framework.TestCase;

public class RegistrationStoryTest extends TestCase{

	RegistrationInt _forumRegimp = new RegistrationProxy();
	public RegistrationStoryTest(String name) {
		super(name);
	}

	public void testRegister() {
		assertTrue(_forumRegimp.register("user1","abc@gmail.com","superpassword"));
		assertTrue(_forumRegimp.isRegisteredUser("user1"));
		assertTrue(_forumRegimp.isRegularUser("user1"));
		assertFalse( _forumRegimp.register("user2","abc@gmail.com"," ") );
		assertFalse(_forumRegimp.isRegisteredUser("user2"));
		assertFalse( _forumRegimp.register("user2","abc@gmail.com","") );
		assertFalse( _forumRegimp.register("user2","abc@gmail.com","1") );
		assertFalse( _forumRegimp.register("user2","abc@gmail.com","12") );
		assertFalse( _forumRegimp.register("user2","abc@gmail.com","!") );
		assertFalse( _forumRegimp.register("user1","abc@gmail.com","valid") );
		assertFalse( _forumRegimp.register("","abc@gmail.com","valid") );
		assertFalse( _forumRegimp.register(" ","abc@gmail.com","password") );
		assertFalse( _forumRegimp.register("user12345678912345678912345678912345678912345678901234567890","abc@gmail.com"
										  ,"password1234567891234567891234567891234512345678901234567890") );
		assertTrue( _forumRegimp.deleteRegisterUser("user1") );
		assertFalse(_forumRegimp.isRegisteredUser("user1"));
		}
}
